package edu.whu.demo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import edu.whu.demo.domain.Schedule;
import com.baomidou.mybatisplus.extension.service.IService;
import edu.whu.demo.domain.ScheduleView;
import edu.whu.demo.exception.ScheduleAdminException;
import org.springframework.transaction.annotation.Transactional;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 
 * @since 2022-11-24
 */
public interface IScheduleService extends IService<Schedule> {

    /*新建日程*/
    public Schedule createSchedule(Schedule schedule) throws ScheduleAdminException;

    /*根据id查询日程，包括对应的频率信息*/
    public Schedule getScheduleById(long id);

    /*将活动添加日程*/
    public Schedule addSchedule(long uid,long activityId) throws ScheduleAdminException;
    /*用户更新日程信息*/
    public Schedule updateScheduleUser(long uid,long id,Schedule schedule) throws ScheduleAdminException;

    /*爬虫变更日程信息*/
    public void updateSchedule(long activityId) throws ScheduleAdminException;

    /*删除日程*/
    public void deleteSchedule(long id);

    /*查询日程*/
    public IPage<ScheduleView> findScheduleDetails(Map<String,Object> contains, long pageNum, long pageSize) throws ScheduleAdminException;

    public List<String> findScheduleLabel();

    public List<String> divideTime(String time);

    public List<String> getWeekDays(String date1) throws  ScheduleAdminException;

    public Map<String,List<ScheduleView>> getWeekSchedule(Long uid,String date) throws ScheduleAdminException;
}

